/*
 * (C) Copyright 2005-2010 by Burrp Software Pvt. Ltd. All Rights Reserved.
 *
 * This software is the proprietary information of Burrp Software Pvt. Ltd.
 * Use is subject to license terms.
 *
 * Burrp Software Pvt. Ltd. -- http://www.burrp.com
 */
package com.showmemysite.rules;

public class Header {
	public static String addHeader(String content, String baseUrl){
		//		return content;
		int index = content.indexOf("<body");
		int bodyTagEndIndex = content.indexOf(">", index);
		String one = content.substring(0,bodyTagEndIndex+1);
		String two = content.substring(bodyTagEndIndex+1);
		String head = "<div style=\"width:100%;" +
		"height:25px;" +
		"display:block;" +
		"color:white;" +
		"background-color:#3B5998;" +
		"position:fixed;" +
		"top:0px;" +
		"left:0px;" +
		"white-space: nowrap;" +
		"min-width:960px;" +
		"\" align=\"left\">" +
		"<form action=\"http://showmemysite.appspot.com/Program\">"+
		"<button type=\"button\" onclick=\"draw();\" value=\"Squiggle\">Squiggle</button>" +
		"<button type=\"button\" onclick=\"erase();\" value=\"Squiggle\">Erase</button>" +
		"<button type=\"button\" onclick=\"eraseAll();\" value=\"Squiggle\">EraseAll</button>" +
		"<input type=\"text\" size=\"80\" name=\"link\" />" +
		"<button type=\"submit\" onclick=\"eraseAll();\" value=\"Squiggle\">Change link</button>" +
		"<a href=\""+baseUrl+"\">Original Website</a>" +
		"</form>"+
		"</div>";
		return one+head+two;
	}
}
